﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DemoRealtimeData.Service
{
    public sealed class Database
    {
        // ############################################# //
        #region [ member fields ]

        public string[] Keys { get; private set; }

        #endregion

        // ############################################# //
        #region [ constructor and destructor ]

        public Database(string[] devices, DataType[] datatypes)
        {
            IList<string> keys = new List<string>();
            foreach (var dev in devices)
            {
                foreach (var datatype in datatypes)
                {
                    keys.Add(Common.MakeKey(dev,datatype));
                }
            }
            this.Keys = keys.ToArray();
        }

        #endregion
    }
}
